﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Imaginecup.recycling.Object;
using Imaginecup.Recycling.GameMan;
using Imaginecup.recycling.Factory;
using Imaginecup.gameState.recycling.GameMan;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace Imaginecup.recycling.Stage
{
    public abstract class BaseStage
    {
        protected StageManager m_StageManager;
        protected GameManager m_GameManager;
        protected bool m_bGameOver = false;

        public BaseStage()
        {
            //Initialize();
        }

        protected void ChangeStage(StageID stage)
        {
            m_StageManager.ChangeStage(stage);
        }

        public void SetChangeMan(IManager manager)
        {
            if (manager is StageManager)
                m_StageManager = (StageManager)manager;
            else // 매니저가 정상적이지 않으면 에러 강제 발생
                throw new NotImplementedException();
        }

        protected abstract void Initialize();
        public virtual void Update(GameTime gameTime)
        {
            m_GameManager.Update(gameTime);
        }

        public virtual void Draw(SpriteBatch spriteBatch, GameTime gameTime)
        {
            m_GameManager.Draw(spriteBatch, gameTime);
        }

    }
}
